import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询礼物订单列表
export function listOrderGift(data) {
  return request({
    url: '/order/gift/orderGiftList',
    method: 'post',
    data: data
  })
}

// 查询礼物订单详细
export function getOrderGift(OrderNo) {
  return request({
    url: '/order/gift/' + parseStrEmpty(OrderNo),
    method: 'get'
  })
}

// 新增礼物订单
export function addOrderGift(data) {
  return request({
    url: '/order/gift',
    method: 'post',
    data: data
  })
}

// 修改礼物订单
export function updateOrderGift(data) {
  return request({
    url: '/order/gift',
    method: 'put',
    data: data
  })
}

// 删除礼物订单
export function delOrderGift(OrderNo) {
  return request({
    url: '/order/gift/' + OrderNo,
    method: 'delete'
  })
}

// 礼物订单状态修改
export function changeOrderGiftStatus(OrderNo, status) {
  const data = {
    OrderNo,
    status
  }
  return request({
    url: '/order/gift/orderGiftChangeStatus',
    method: 'put',
    data: data
  })
}